<template>
	<view class="recruitment-list">
		<view class="recruitment-item-top">
			<view class="item-top">
				<view class="role">
					<text>{{item.work_type_name }}</text>
				</view>
				<view class="position">
					<text>{{item.settlement_method }}</text>
				</view>
			</view>
			<view class="item-center">
				<view class="recruit-number">
					<text>招工：{{item.number}}人</text>
				</view>
				<view class="recruit-time">
					<text>{{item.data}}</text>
				</view>
			</view>
			<view class="item-bottom">
				<view class="recruit-condition" v-for="(item2,index) in getAggLabel(item.labelname)" :key="index">
					<text>{{item2}}</text>
				</view>
			</view>
		</view>
		<view class="line"></view>
		<view class="recruitment-item-bottom">
			<view class="label" :style="{background:item.backgroundColor}">
				<text>{{item.recruitment_type }}</text>
			</view>
			<view class="recruit-company">
				<view class="recruit-company-top">
					<text>{{item.team_name||item.company_name }}</text>
					<image class="company-icon" :src="item.companyIcon" />
				</view>
				<view class="recruit-company-bottom">
					<image class="location-icon" src="../../../../static/image/job/location.png" />
					<text class="city-name">{{item.city_name  }}</text>
					<text>{{item.area_name }}</text>
				</view>
			</view>
			<!-- <view class="contact" @click.stop="makePhone(item.contacts_method)">
				<text>联系他</text>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {

		props: {
			item: {
				type: Object
			}
		},
		data() {
			return {
				
			}
		},
		mounted() {
			// this.setLabelData()
		},
		methods: {
			getAggLabel(str){
				return str.split(",")
			},
			makePhone(phone){
				uni.makePhoneCall({
				    phoneNumber: phone //仅为示例
				});
			}
		}
	}
</script>
<style lang="less" scoped>
	.recruitment-item-top {

		margin: 0rpx 34rpx 20rpx 34rpx;

		.item-top {
			display: flex;
			align-items: center;
			margin-bottom: 4rpx;

			.role {
				font-size: 32rpx;
				font-weight: 500;
				color: #333333;
				line-height: 44rpx;
				flex: 1;
			}

			.position {

				font-size: 32rpx;
				font-weight: 500;
				color: #F49B22;
				line-height: 44rpx;
			}
		}

		.item-center {
			font-size: 28rpx;
			font-weight: 400;
			color: #666666;
			line-height: 40rpx;
			display: flex;
			align-items: center;
			margin-bottom: 32rpx;

			.recruit-number {
				flex: 1;
			}
		}

		.item-bottom {
			display: flex;
			align-items: center;
			text-align: center;

			.recruit-condition {
				font-size: 24rpx;
				font-weight: 400;
				color: #666666;
				line-height: 34rpx;
				background: #F4F5F9;
				border-radius: 6rpx;
				margin-right: 20rpx;
				padding: 3rpx 16rpx;
			}
		}
	}

	.line {
		border-bottom: 2rpx solid #EEEEEE;
	}

	.recruitment-item-bottom {
		display: flex;
		align-items: center;
		margin: 18rpx 14rpx 0rpx 34rpx;

		.label {
			width: 80rpx;
			// height: 80rpx;
			background: #2E68DB;
			border-radius: 6rpx;
			font-size: 30rpx;
			font-weight: 500;
			color: #FFFFFF;
			line-height: 80rpx;
			text-align: center;
		}

		.recruit-company {
			margin-left: 20rpx;
			margin-right: 17rpx;
			flex: 1;

			.recruit-company-top {
				display: flex;
				align-items: center;

				&>text {
					font-size: 32rpx;
					font-weight: 400;
					color: #333333;
					line-height: 44rpx;
					display: block;
				}

				.company-icon {
					width: 24rpx;
					height: 28rpx;
					margin-left: 7rpx;
					display: block;
				}
			}

			.recruit-company-bottom {
				margin-top: 10rpx;
				display: flex;
				align-items: center;

				.location-icon {
					width: 24rpx;
					height: 32rpx;
					margin-right: 12rpx;
					display: block;
				}

				&>text {
					font-size: 24rpx;
					font-weight: 400;
					color: #999999;
					line-height: 34rpx;
					display: block;
				}
			}
		}

		.contact {
			width: 168rpx;
			// height: 60px;
			border-radius: 8rpx;
			border: 2rpx solid #B8212B;
			font-size: 30rpx;
			font-weight: 500;
			color: #B8212B;
			line-height: 60rpx;
			text-align: center;
			// margin: 0 auto;
		}
		.city-name{
			margin-right: 20rpx;
		}
	}
</style>
